package com.ts.content.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ts.content.dto.TopicDTO;
import com.ts.content.entity.PostEntity;
import com.ts.content.entity.TopicEntity;
import com.ts.content.service.PostService;
import com.ts.content.service.TopicService;
import net.sf.jsqlparser.statement.select.Top;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/topic")
public class TopicController {

    @Autowired
    private TopicService topicService;

    @PostMapping("/page")
    public IPage<TopicDTO> page(@RequestBody Page<TopicDTO> page){
        return topicService.getTopicList(page);
    }
}
